package org.lmw.mm.dao;

import com.jfinal.plugin.activerecord.Model;
/**
 * 
 * 此类描述的是：   秘密Post
 * @author: limengwei   
 * @version: 2014-6-5 上午11:47:58
 */
public class Coment_Post extends Model<Coment_Post> {
  private static final long serialVersionUID = -8015021741160292107L;
  public static final Coment_Post dao=new Coment_Post();
  
  /**
   * 
   * 此方法描述的是：是否是第一次评论   
   * @author: limengwei   
   * @version: 2014-6-5 下午5:31:25
   */
  public boolean isFirstComent(Object authorId,Object postId ){
    Coment_Post up = Coment_Post.dao.findFirst("select id from mm_coment_post where userId=? and postId=?",authorId,postId);
    if(up==null){
      return true;
    }else{
      return false;
    }
  }
  
}
